import request from '@/utils/request'

//通知与提醒
export const getNotificationList = (userId) =>
  request.get('/notification/getnotifications', { params: { userId: userId, } }

  )

// 获取主管发送的通知列表
export const getSentNotifications = () => request.get('/notification/getsendnotifications')

//标记通知为已读
export const markNotificationAsRead = (id) => request.put(`/notification/isread/${id}`)

// 删除通知
export const deleteNotification = (id) => request.delete(`/notification/deletenotification/${id}`)

// 获取未读通知
export const getUnreadNotifications = () => request.get('/notification/unread')

//发送通知
export const sendNotification = (target, data) => request.post(`/notification/sendnotification/${target}`, data);



